Xbasic
OBJECT.TYPE Function
Syntax
Data_Type as C = <OBJECT>.Type()
Description
Returns the type for the data bound to an object.
The <OBJECT>.TYPE() method applies to:
- Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
- Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)
- Form Controls (for <OBJECT> use the <CONTROL> pointer or the address of the control)
The <OBJECT>.TYPE() method returns the type of data bound to an object. Valid types are:
- Type
- Meaning
- C
Character
- N
Numeric
- M
Memo, Bitmap, Rich Text Memo, OLE
- L
Logical
- D
Date
- V
Not bound to anything
Example
This script is attached to a button on a form. It prints out to the Trace window the name of each object on the form and the type of the data that object is bound to.
f = parentform.this count = f.children() for i = 1 to count object = f.child(i) name = object.name() type = object.type() :trace.writeln(name + " " + type) next i
Limitations
Desktop applications only.
See Also